﻿<%@ Page Title="" Language="C#" MasterPageFile="~/GUI/MasterPage.master" AutoEventWireup="true" CodeFile="BookDetail.aspx.cs" Inherits="Home_BookDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript">

        function confirmation(BookID) {
            var err = "<%=deletecf%>";
            var answer = confirm(err);
            if (answer) {
                window.location = "Delete.aspx?bookid=" + BookID;
            }
        }
    </script>
    <div class="First">
        <div class="IconTitle">
            <img src="../Images/icon_title.png" /></div>
        <div class="Title"><%=Language["BookDetail"]%></div>
        <div class="ButtonAdd"><a href="../Home/AddNewBook.aspx">
            <img src="../Images/add.png" /></a></div>
    </div>
    <div id="bookDetailContent">
        

        <div class="ImageBookDetail">
            <img src="..<%=currentBook.Image %>" />
        </div>
        <div id="bookDcription">
            <p class="NameBook"><%=currentBook.Name%></p>
            <div class="NameAndDescription">
                <p class="Description"><span class="fieldBook">Description:</span><%=currentBook.Description%></p>
            </div>
            <div class="DateCreate"><span class="fieldBook">Create date:</span> <%=currentBook.DateUpload%></div>
            <div class="NumberDownload"><span class="fieldBook">Number download:</span> <%=currentBook.NumberOfDownload%></div>
            <div class="ActiveBook"><span class="fieldBook">Active:</span> <%=ConvertActive((bool)currentBook.Active)%></div>
            <div class="ActionBook">
                <a href="../Home/AddNewBook.aspx?bookid=<%= currentBook.ID %>">
                    <img src="../Images/TextEdit.png" alt="Edit" width="30px" title="Edit" />
                </a>
                <a href="#" onclick="confirmation(<%= currentBook.ID %>)">
                    <img src="../Images/DeleteRed.png" alt="Edit" width="30px" title="Delete" />
                </a>
            </div>
        </div>
    </div>
</asp:Content>

